-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use alert details page URL for the log threshold rule if the config is enabled #161175
Use alert details page URL for the log threshold rule if the config is enabled #161175
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
💚 Build Succeeded
Metrics [docs]Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Tested locally, and works as expected.
…s enabled (elastic#161175) Fixes elastic#161117 ## Summary If `xpack.observability.unsafe.alertDetails.logs.enabled` is enabled, we will use the new alert details page URL in `context.alertDetailsUrl` otherwise, we send the user to the alerts page filtered for that alert. (Partially brings back [the logic for alert details URL](https://github.com/elastic/kibana/pull/157987/files#diff-a71ca536380c1fde8805744b23566ce795707f92b94a03af73347cac46ccac63L1027) and [getAlertDetailsConfig](https://github.com/elastic/kibana/pull/157987/files#diff-a71ca536380c1fde8805744b23566ce795707f92b94a03af73347cac46ccac63L1027)) ## 🧪 How to test 1. Set `xpack.observability.unsafe.alertDetails.logs.enabled` as false in Kibana yml config or remove the config 2. Create a log threshold rule with an action for both active state and recovered state 3. When the alert is triggered, check the default message, it should include the alertDetailsURL, by clicking on that, you should land on the alerts page filtered for that alert 4. Make the alert recovered and check and similar URL should be generated New alert details page: 1. Set `xpack.observability.unsafe.alertDetails.logs.enabled` as true in Kibana yml config 2. Repeat the steps 2,3,4 as mentioned before 3. This time, you should land on the new alert details page ![image](https://github.com/elastic/kibana/assets/12370520/a2f99bd7-cfaa-4146-bedf-72458973b463) (cherry picked from commit f758ba4)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…nfig is enabled (#161175) (#161241) # Backport This will backport the following commits from `main` to `8.9`: - [Use alert details page URL for the log threshold rule if the config is enabled (#161175)](#161175) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Maryam Saeidi","email":"maryam.saeidi@elastic.co"},"sourceCommit":{"committedDate":"2023-07-05T10:39:58Z","message":"Use alert details page URL for the log threshold rule if the config is enabled (#161175)\n\nFixes #161117\r\n\r\n## Summary\r\n\r\nIf `xpack.observability.unsafe.alertDetails.logs.enabled` is enabled, we\r\nwill use the new alert details page URL in `context.alertDetailsUrl`\r\notherwise, we send the user to the alerts page filtered for that alert.\r\n(Partially brings back [the logic for alert details\r\nURL](https://github.com/elastic/kibana/pull/157987/files#diff-a71ca536380c1fde8805744b23566ce795707f92b94a03af73347cac46ccac63L1027)\r\nand\r\n[getAlertDetailsConfig](https://github.com/elastic/kibana/pull/157987/files#diff-a71ca536380c1fde8805744b23566ce795707f92b94a03af73347cac46ccac63L1027))\r\n\r\n## 🧪 How to test\r\n\r\n1. Set `xpack.observability.unsafe.alertDetails.logs.enabled` as false\r\nin Kibana yml config or remove the config\r\n2. Create a log threshold rule with an action for both active state and\r\nrecovered state\r\n3. When the alert is triggered, check the default message, it should\r\ninclude the alertDetailsURL, by clicking on that, you should land on the\r\nalerts page filtered for that alert\r\n4. Make the alert recovered and check and similar URL should be\r\ngenerated\r\n\r\nNew alert details page:\r\n\r\n1. Set `xpack.observability.unsafe.alertDetails.logs.enabled` as true in\r\nKibana yml config\r\n2. Repeat the steps 2,3,4 as mentioned before\r\n3. This time, you should land on the new alert details page\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/12370520/a2f99bd7-cfaa-4146-bedf-72458973b463)","sha":"f758ba47507fb3ec18ffbaeab32ff36ea828dd2c","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:prev-minor","v8.10.0"],"number":161175,"url":"https://github.com/elastic/kibana/pull/161175","mergeCommit":{"message":"Use alert details page URL for the log threshold rule if the config is enabled (#161175)\n\nFixes #161117\r\n\r\n## Summary\r\n\r\nIf `xpack.observability.unsafe.alertDetails.logs.enabled` is enabled, we\r\nwill use the new alert details page URL in `context.alertDetailsUrl`\r\notherwise, we send the user to the alerts page filtered for that alert.\r\n(Partially brings back [the logic for alert details\r\nURL](https://github.com/elastic/kibana/pull/157987/files#diff-a71ca536380c1fde8805744b23566ce795707f92b94a03af73347cac46ccac63L1027)\r\nand\r\n[getAlertDetailsConfig](https://github.com/elastic/kibana/pull/157987/files#diff-a71ca536380c1fde8805744b23566ce795707f92b94a03af73347cac46ccac63L1027))\r\n\r\n## 🧪 How to test\r\n\r\n1. Set `xpack.observability.unsafe.alertDetails.logs.enabled` as false\r\nin Kibana yml config or remove the config\r\n2. Create a log threshold rule with an action for both active state and\r\nrecovered state\r\n3. When the alert is triggered, check the default message, it should\r\ninclude the alertDetailsURL, by clicking on that, you should land on the\r\nalerts page filtered for that alert\r\n4. Make the alert recovered and check and similar URL should be\r\ngenerated\r\n\r\nNew alert details page:\r\n\r\n1. Set `xpack.observability.unsafe.alertDetails.logs.enabled` as true in\r\nKibana yml config\r\n2. Repeat the steps 2,3,4 as mentioned before\r\n3. This time, you should land on the new alert details page\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/12370520/a2f99bd7-cfaa-4146-bedf-72458973b463)","sha":"f758ba47507fb3ec18ffbaeab32ff36ea828dd2c"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/161175","number":161175,"mergeCommit":{"message":"Use alert details page URL for the log threshold rule if the config is enabled (#161175)\n\nFixes #161117\r\n\r\n## Summary\r\n\r\nIf `xpack.observability.unsafe.alertDetails.logs.enabled` is enabled, we\r\nwill use the new alert details page URL in `context.alertDetailsUrl`\r\notherwise, we send the user to the alerts page filtered for that alert.\r\n(Partially brings back [the logic for alert details\r\nURL](https://github.com/elastic/kibana/pull/157987/files#diff-a71ca536380c1fde8805744b23566ce795707f92b94a03af73347cac46ccac63L1027)\r\nand\r\n[getAlertDetailsConfig](https://github.com/elastic/kibana/pull/157987/files#diff-a71ca536380c1fde8805744b23566ce795707f92b94a03af73347cac46ccac63L1027))\r\n\r\n## 🧪 How to test\r\n\r\n1. Set `xpack.observability.unsafe.alertDetails.logs.enabled` as false\r\nin Kibana yml config or remove the config\r\n2. Create a log threshold rule with an action for both active state and\r\nrecovered state\r\n3. When the alert is triggered, check the default message, it should\r\ninclude the alertDetailsURL, by clicking on that, you should land on the\r\nalerts page filtered for that alert\r\n4. Make the alert recovered and check and similar URL should be\r\ngenerated\r\n\r\nNew alert details page:\r\n\r\n1. Set `xpack.observability.unsafe.alertDetails.logs.enabled` as true in\r\nKibana yml config\r\n2. Repeat the steps 2,3,4 as mentioned before\r\n3. This time, you should land on the new alert details page\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/12370520/a2f99bd7-cfaa-4146-bedf-72458973b463)","sha":"f758ba47507fb3ec18ffbaeab32ff36ea828dd2c"}}]}] BACKPORT--> Co-authored-by: Maryam Saeidi <maryam.saeidi@elastic.co>
Fixes #161117
Summary
If
xpack.observability.unsafe.alertDetails.logs.enabled
is enabled, we will use the new alert details page URL incontext.alertDetailsUrl
otherwise, we send the user to the alerts page filtered for that alert. (Partially brings back the logic for alert details URL and getAlertDetailsConfig)🧪 How to test
xpack.observability.unsafe.alertDetails.logs.enabled
as false in Kibana yml config or remove the configNew alert details page:
xpack.observability.unsafe.alertDetails.logs.enabled
as true in Kibana yml config